package edu.gdkm.service.impl;

import edu.gdkm.service.ProductDetailService;
import edu.gdkm.sql.pojo.ProductDetail;
import edu.gdkm.sql.dao.ProductDetailMapper; // 假设你使用了MyBatis或类似的ORM框架

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class ProductDetailServiceImpl implements ProductDetailService {
    @Autowired
    private ProductDetailMapper productDetailMapper; // 注入Mapper对象，用于数据库操作

    @Override
    public ProductDetail getProductDetailById(int id) {
        return productDetailMapper.getProductDetailById(id);
    }

    @Override
    public ProductDetail getProductDetailByProductId(int productId) {
        return productDetailMapper.getProductDetailByProductId(productId);
    }

    // 实现其他业务方法...
}